package com.coreJava.设计模式.责任链模式;

/**
 * 作者: LCG
 * 日期: 2019/9/5 15:54
 * 描述:
 */
public class ZeRenHandlerImpl extends ZeRenAbstract implements ZeRenHandler {

    private String name;

    public ZeRenHandlerImpl(String name) {
        this.name = name;
    }

    @Override
    public void test1() {
        System.out.println("============"+name);
        if(getZeRenHandler()!=null){
            getZeRenHandler().test1();
        }
    }
}
